package com.wanli.graalvmdemo.dao;

import org.springframework.data.repository.query.Param;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import org.springframework.data.r2dbc.repository.Query;
import reactor.core.publisher.Mono;

import com.wanli.graalvmdemo.entity.User;

public interface UserRepository extends ReactiveCrudRepository<User, Long> {
  @Query("SELECT * FROM t_users WHERE username = :username")
  Mono<User> findByUsername(@Param("username") String username);
}